home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / cxref-1.001 / cxref-1~ / cxref / cxref.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-24  |  5.3 KB  |  175 lines

  1. /***************************************
  2.   $Header: /home/amb/cxref/RCS/cxref.h 1.14 1996/02/24 14:53:03 amb Exp $
  3.  
  4.   C Cross Referencing & Documentation tool. Version 1.0
  5.  
  6.   Prototypes for general functions.
  7.   ******************/ /******************
  8.   Written by Andrew M. Bishop
  9.  
  10.   This file Copyright 1995,96 Andrew M. Bishop
  11.   It may be distributed under the GNU Public License, version 2, or
  12.   any higher version.  See section COPYING of the GNU Public license
  13.   for conditions under which this file may be redistributed.
  14.   ***************************************/
  15.  
  16.  
  17. #ifndef CDOC_H
  18. #define CDOC_H  /*+ To stop multiple inclusions. +*/
  19.  
  20. #include <stdio.h>
  21.  
  22. /* Definitions for variable / function / file types */
  23.  
  24. #define LOCAL     1  /*+ Signifies a LOCAL function / variable / include file. +*/
  25. #define GLOBAL    2  /*+ Signifies a GLOBAL fuction / variable / include file. +*/
  26. #define EXTERNAL  4  /*+ Signifies an EXTERNAL variable. +*/
  27. #define EXTERN_H  8  /*+ Signifies an EXTERNAL variable seen in a header file. +*/
  28. #define INLINED  16  /*+ Signifies an INLINED function. +*/
  29.  
  30. /* Definitions for -xref options */
  31.  
  32. #define XREF_FILE   1                   /*+ Signifies that file cross references are required. +*/
  33. #define XREF_FUNC   2                   /*+ Signifies that function cross references are required. +*/
  34. #define XREF_VAR    4                   /*+ Signifies that variable cross references are required. +*/
  35. #define XREF_TYPE   8                   /*+ Signifies that type definition cross references are required. +*/
  36. #define XREF_ALL   15                   /*+ Signifies that all the above cross references are required. +*/
  37.  
  38. /* Definitions for -warn options */
  39.  
  40. #define WARN_COMMENT  1  /*+ Signifies that warnings for commetns are required. +*/
  41. #define WARN_XREF     2  /*+ Signifies that warnings for cross references are required. +*/
  42. #define WARN_ALL      3  /*+ Signifies that all of the above warnings are required. +*/
  43.  
  44. /* Definitions for -index options */
  45.  
  46. #define INDEX_FILE   1   /*+ Signifies that an index of files is needed. +*/
  47. #define INDEX_FUNC   2   /*+ Signifies that an index of global functions is needed. +*/
  48. #define INDEX_VAR    3   /*+ Signifies that an index of global variables is needed. +*/
  49. #define INDEX_TYPE   4   /*+ Signifies that an index of type definitions is needed. +*/
  50. #define INDEX_ALL   15   /*+ Signifies that a complete index of all of the above is needed. +*/
  51.  
  52. /* in file.c */
  53.  
  54. #ifdef DATA_TYPE_H
  55. File NewFile(char* name);
  56. void DeleteFile(File file);
  57. #endif
  58.  
  59. void SeenFileComment(char* comment);
  60.  
  61. /* in comment.c */
  62.  
  63. void SeenComment(char* c);
  64. char* GetCurrentComment(void);
  65. void SetCurrentComment(char* comment);
  66. char* SplitComment(char** original,char* name);
  67.  
  68. /* in preproc.c */
  69.  
  70. void SeenInclude(char* name,int flag);
  71.  
  72. void SeenDefine(char* name);
  73. void SeenDefineValue(char* value);
  74. void SeenDefineFunctionArg(char* name);
  75. void SeenDefineFuncArgComment(void);
  76. void SeenDefineComment(void);
  77.  
  78. /* in type.c */
  79.  
  80. void SeenTypedefName(char* name);
  81. int HaveISeenType(char* name);
  82. void SeenTypedef(char* name,char* type);
  83.  
  84. void SeenStructUnionStart(char* name);
  85. void SeenStructUnionComp(char* name,int depth);
  86. void SeenStructUnionEnd(void);
  87.  
  88. void DeleteSpareTypes(void);
  89. #ifdef DATA_TYPE_H
  90. void DeleteStructUnion(StructUnion su);
  91. #endif
  92.  
  93. /* in var.c */
  94.  
  95. void SeenVariableDefinition(char* name,char* type,int scope);
  96.  
  97. void UpScope(void);
  98. void DownScope(void);
  99. void SeenScopeVariable(char* name);
  100. int IsAScopeVariable(char* name);
  101.  
  102. /* in func.c */
  103.  
  104. char* SeenCPPFilename(char* name);
  105. void SeenFunctionProto(char* name);
  106.  
  107. void SeenFunctionDeclaration(char* name,int scope);
  108. void SeenFunctionDefinition(char* type);
  109. void SeenFunctionArg(char* name);
  110.  
  111. void SeenFunctionCall(char* name);
  112. void CheckFunctionVariableRef(char* name,int in_a_function);
  113.  
  114. void SeenFuncIntComment(char* comment);
  115.  
  116. void DeleteSpareProtos(void);
  117.  
  118. /* In slist.c */
  119.  
  120. #ifdef DATA_TYPE_H
  121. void InitStringList(StringList* sl);
  122. void AddToStringList(StringList* sl,char* str,int alphalist);
  123. void DeleteStringList(StringList* sl);
  124.  
  125. void InitStringList2(StringList2* sl);
  126. void AddToStringList2(StringList2* sl,char* str1,char* str2);
  127. void DeleteStringList2(StringList2* sl,int free_them);
  128. #endif
  129.  
  130. /* In xref.c */
  131.  
  132. #ifdef DATA_TYPE_H
  133. void CrossReference(File file);
  134. void CreateAppendix(StringList* files,StringList* funcs,StringList* vars,StringList* types);
  135. #endif
  136.  
  137. /* In warn-raw.c */
  138.  
  139. #ifdef DATA_TYPE_H
  140. void WriteWarnRawFile(File file);
  141. void WriteWarnRawAppendix(StringList* files,StringList* funcs,StringList* vars,StringList* types);
  142. #endif
  143.  
  144. /* In latex.c */
  145.  
  146. #ifdef DATA_TYPE_H
  147. void WriteLatexFile(File file);
  148. void WriteLatexAppendix(StringList* files,StringList* funcs,StringList* vars,StringList* types);
  149. #endif
  150.  
  151. /* In html.c */
  152.  
  153. #ifdef DATA_TYPE_H
  154. void WriteHTMLFile(File file);
  155. void WriteHTMLAppendix(StringList* files,StringList* funcs,StringList* vars,StringList* types);
  156. #endif
  157.  
  158. /* Not defined on Suns */
  159.  
  160. #if defined(__sun__) && !defined(__svr4__)
  161. int fputs(const char *s, FILE *stream);
  162. int fprintf(FILE*, const char*,...);
  163. int pclose( FILE *stream);
  164. int fscanf( FILE *stream, const char *format, ...);
  165. int fclose(FILE*);
  166. int rename(const char *oldpath, const char *newpath);
  167. int printf(const char*,...);
  168. int fwrite(const void*,unsigned int,unsigned int, FILE*);
  169. int fread(void*,unsigned int,unsigned int, FILE*);
  170. int isatty(int desc);
  171. int fflush( FILE *stream);
  172. #endif
  173.  
  174. #endif
  175.